# -*- coding: utf-8 -*-
a = 1;
for i in range(10):
    print(a)
    a += 1

#用任意语言逆序输出一个字符串，比如「欢乐逛欢迎您」，输出「您迎欢逛乐欢」
l = ['欢乐逛欢迎您']
m = l[0]
n = [m[0],m[1],m[2],m[3],m[4],m[5]]
n.reverse()
print(n[0]+n[1]+n[2]+n[3]+n[4]+n[5])


#str = 'a.hello'在字符串str中查找hello
Str = 'a.hello'
hellol = []
t = Str[0:2]
l.append(t)
t1 = Str[2:]
l.append(t1)
if 'hello' in l:
    print(True)

# str = 'a,b,c,d' 用都好分割str字符串，并保存到列表
Str = 'a,b,c,d'
l = []
l.append(Str[0])
l.append(Str[2])
l.append(Str[4])
l.append(Str[6])
print(l)

#将“笔试题123A”中123替换为“进行中”
a = "笔试题123A"
l = a.replace("123","进行中")
print(l)

#用循环的方式做出石头剪刀布的游戏并且输入中文
import random
list = ['1','2','3']
cp = random.randint(0,2)
b = input("请输入猜拳'石头(1)','剪刀(2)','布(3)'")
if b in list:
    a = int(b)
    if a == cp:
        print("平局")
    elif (a == 1 and cp ==2) or (a == 2 and cp == 3) or (a == 3 and cp ==1):
        print("玩家获胜")
    else:
        print("玩家失败")


# 一个学校，三个办公室，八位老师，随机分配办公室
import random
office = [[],[],[]]
teacher = [1,2,3,4,5,6,7,8]
for i in teacher:
    office[random.randint(0,2)].append(i)
print(office)

